<?
layout("/inc/layout.html",{title:sysTitle}){
?>

<link rel="stylesheet" href="static/utf8-jsp/third-party/video-js/video-js.css" type="text/css"></link>
<script type="text/javascript" src="static/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="static/utf8-jsp/ueditor.config.js"></script>
<script type="text/javascript" src="static/utf8-jsp/ueditor.all.js"></script>
<script type="text/javascript" src="static/utf8-jsp/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" src="static/utf8-jsp/third-party/video-js/video.js"></script>


<link rel="stylesheet" href="static/uploadify/uploadify.css" type="text/css"></link>
<script type="text/javascript" src="static/uploadify/jquery.uploadify.min.js"></script>

<div id="page-wrapper">
	<!--BEGIN TITLE & BREADCRUMB PAGE-->
	<div id="title-breadcrumb-option-demo" class="page-title-breadcrumb">
		<div class="page-header pull-left">
			<div class="page-title">知识加工</div>
		</div>
		<ol class="breadcrumb page-breadcrumb pull-left">
			<li><i class="fa fa-home"></i>&nbsp;<a href="main.html">首页</a>&nbsp;&nbsp;<i
				class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
			<li>知识库管理&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
			<li class="active">知识加工</li>
		</ol>

		<div class="clearfix"></div>
	</div>
	<!--END TITLE & BREADCRUMB PAGE-->
	<!--BEGIN CONTENT-->
	<div class="page-content">

		<div class="row">
			<div class="col-lg-12">
				<div class="note note-danger">
					<h3 class="box-heading">${headline}</h3>
					<input type="hidden" value=${headline} id="headline" name="headline" />
					<p>${describe}</p>
				</div>
			</div>
		</div>

		<!-- 知识分类e -->
		<div class="row">
			<div class="col-lg-12">
				<!--  -->
				<form action="knowledge-edit-data-detail-add.html" method="post" enctype="multipart/form-data"  name="wsxForm" id="wsxForm" class="Huiform wsxForm" onsubmit ="getElementById('submitInput').disabled=true;return true;" >
				<ul id="generalTab" class="nav nav-tabs ul-edit responsive">
					<li class="active"><a href="#dp-tab" data-toggle="tab">基础信息</a></li>
					<!--  <?for( op in objectProperty){?>
					 	<li><a href="#${op.nameEn}" onclick="queryrelevance('${op.relevanceClassesId}','${op.id}')" data-toggle="tab">${op.nameZh}</a></li>
                    <?}?>-->
                    	<li style="float:right"><input type="button"  class="btn btn-primary" onclick="returnList()" value="返回"/></li>
                    <!--
                    <li><a href="#word-tab" data-toggle="tab">医学词典关联（词表关联）</a>
                    </li>
                    <li><a href="#lifecycle-tab" data-toggle="tab">时间轴（数据生命周期）</a>
                    </li> -->
				</ul>
					<div id="generalTabContent" class="tab-content responsive">
						<div id="dp-tab" class="tab-pane fade in active">
							<div class="row">
								<input type="hidden" value=${classesEn} id="classesEn" name="classesEn" />
								<input type="hidden" value=${classesId} name="classesId" id="classesId" />
								<input type="hidden" value=${serversPath} name="serversPath" id="serversPath" />
								<input type="hidden" value=${chartName} name="chartName" id="chartName" />
								<input type="hidden" value=${databaseName} name="databaseName" id="databaseName" />
								<textarea id="uploadImage" name="uploadImage"></textarea>
								<?for( dataPropertiesName in dataProperties){?>
								<?if(dataPropertiesName.adminDetailShow == '1'){?>
								<!-- 文本框（分词） -->
								<?if(dataPropertiesName.dataTypeId == 3){?>
								<div class="col-lg-6">
									<div class="form-group">
										<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}
										<?if(dataPropertiesName.formValidationRegulation == '*'){?>
												<span class='require'>*</span>
											<?} ?>
										</label>
										<input id="${dataPropertiesName.nameEn}" type="text" class="form-control" name="${dataPropertiesName.nameEn}" 
										<?if(dataPropertiesName.formValidationRegulation !=''){?>
											datatype="${dataPropertiesName.formValidationRegulation}"
										<?} else {?>
											ignore="ignore"
										<?}?>
										/>
									</div>
								</div>
								<?}?>
								<!-- 金额 -->
								<?if(dataPropertiesName.dataTypeId == 21){?>
								<div class="col-lg-6">
									<div class="form-group">
										<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}
										<?if(dataPropertiesName.formValidationRegulation == '*'){?>
												<span class='require'>*</span>
											<?} ?>
										</label>
										<input id=${dataPropertiesName.nameEn} type="text" class="form-control" onchange="verify(this.value,this.name)"  name="${dataPropertiesName.nameEn}" 
											<?if(dataPropertiesName.formValidationRegulation !=''){?>
												datatype="${dataPropertiesName.formValidationRegulation}"
											<?} else {?>
												ignore="ignore"
											<?}?>
										/>
									</div>
								</div>
								<?}?>
								<!-- 文本框（不分词） -->
								<?if(dataPropertiesName.dataTypeId == 2){?>
								<div class="col-lg-6">
									<div class="form-group">
										<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}
										<?if(dataPropertiesName.formValidationRegulation == '*'){?>
												<span class='require'>*</span>
											<?} ?>
										</label>
										<input id=${dataPropertiesName.nameEn} type="text" class="form-control" onchange="verify(this.value,this.name)"  name="${dataPropertiesName.nameEn}" 
											<?if(dataPropertiesName.formValidationRegulation !=''){?>
												datatype="${dataPropertiesName.formValidationRegulation}"
											<?} else {?>
												ignore="ignore"
											<?}?>
										/>
									</div>
								</div>
								<?}?>
								<!-- 密码 -->
								<?if(dataPropertiesName.dataTypeId == 14){ ?>
								<div class="col-lg-6">
									<div class="form-group">
										<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}
										<?if(dataPropertiesName.formValidationRegulation == '*'){?>
												<span class='require'>*</span>
											<?} ?>
										</label>
										<input id="${dataPropertiesName.nameEn}" type="password" class="form-control" name="${dataPropertiesName.nameEn}" 
										<?if(dataPropertiesName.formValidationRegulation !=''){?>
											datatype="${dataPropertiesName.formValidationRegulation}"
										<?} else {?>
											ignore="ignore"
										<?}?>
										/>
									</div>
								</div>
								<?}?>									
									
								<!-- 文本域 -->
								<?if(dataPropertiesName.dataTypeId ==4){?>
								<div class="col-md-12">
									<div class="form-group">
										<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}
										<?if(dataPropertiesName.formValidationRegulation == '*'){?>
												<span class='require'>*</span>
											<?} ?>
										</label>
										<textarea id=${dataPropertiesName.nameEn} rows="4" class="form-control" name=${dataPropertiesName.nameEn}  
											<?if(dataPropertiesName.formValidationRegulation !=''){?>
											datatype="${dataPropertiesName.formValidationRegulation}"
										<?} else {?>
											ignore="ignore"
										<?}?>
										
										></textarea>
									</div>
								</div>
								<?}?>

								<!-- HTML（大区域） -->
								<?if(dataPropertiesName.dataTypeId ==6){?>
								<div class="col-md-12">
									<div class="form-group content_padding">
										<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}</label>
										<script id="${dataPropertiesName.nameEn}" name="${dataPropertiesName.nameEn}" type="text/plain" ></script>

										<script type="text/javascript" >
											var ue = UE.getEditor('${dataPropertiesName.nameEn}',{ initialFrameHeight:300 });
										</script>
									</div>
								</div>
								<?}?>
								<!-- HTML（小区域） -->
								<?if(dataPropertiesName.dataTypeId == 5){?>
								<div class="col-md-6">
									<div class="form-group" >
										<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}</label>
										<script id="${dataPropertiesName.nameEn}" name="${dataPropertiesName.nameEn}" type="text/plain" ></script>

										<script type="text/javascript" >
											var ue = UE.getEditor('${dataPropertiesName.nameEn}',{ initialFrameHeight:200 ,
											toolbars: [
												['undo', 'redo','|', 'bold', 'italic','underline','|','paragraph','fontfamily',
													'fontsize','forecolor','|', 'justifyleft','justifyright','justifycenter','justifyjustify',
													'|','removeformat','formatmatch','|','rowspacingtop','rowspacingbottom','lineheight','insertorderedlist','insertunorderedlist'
												]
											 ]
											});
										</script>
									</div>
								</div>
								<?}?>

								<!-- 下拉菜单（单值） -->
								<?if(dataPropertiesName.dataTypeId == 7){?>
								<div class="col-md-6">
								<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}
								<?if(dataPropertiesName.formValidationRegulation == '*'){?>
												<span class='require'>*</span>
											<?} ?>
								</label><br/>
									 <input id="dataPropertiesId" name="dataPropertiesId" type="hidden" value=${dataPropertiesName.id} /> 
									<div class="form-group">
									<?for( dMap in dictsMap){?>
									<?if(dataPropertiesName.dictId == dMap.key){ ?>
									<?if(dMap.value == 1){ ?>
										<select class="form-control" id="${dataPropertiesName.id}" name="${dataPropertiesName.nameEn}" 
										<?if(dataPropertiesName.formValidationRegulation !=''){?>
											datatype="${dataPropertiesName.formValidationRegulation}"
										<?} else {?>
											ignore="ignore"
										<?}?>
										
										>
											<option value=''>--请选择--</option>
											<?for(res in resultString){?>
												<?if(res.dpid==dataPropertiesName.id){?>
													<option value="${res.value}">${res.nameZh}</option>
												<?}?>
											<?}?>
										</select>
										<?} else { ?>
											<div class="input-group input-group-sm mbs">
											<input id="dictitemName_${dataPropertiesName.id}" type="text" placeholder="请点击选择" class="form-control" disabled="true" />
											 <span class="input-group-btn">
											 	<button id="t_${dataPropertiesName.id}" onclick="saveEditZTree('${dataPropertiesName.dictId}','${dataPropertiesName.id}')" type="button" data-toggle="dropdown"
													class="btn btn-success dropdown-toggle">选择类..</button>
											</span>
											<input name="${dataPropertiesName.nameEn}" id="dictitemId_${dataPropertiesName.id}" type="hidden" class="form-control" 
											
											 <?if(dataPropertiesName.formValidationRegulation !=''){?>
											datatype="${dataPropertiesName.formValidationRegulation}"
										<?} else {?>
											ignore="ignore"
										<?}?>
										/>
									</div>
										<?}}}?>
										
									</div>
								</div>
								<?}?>
								<!-- 下拉菜单（多值） -->
								<?if(dataPropertiesName.dataTypeId == 20){?>
								<div class="col-md-6">
									<div class="form-group">
										<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}
										<?if(dataPropertiesName.formValidationRegulation == '*'){?>
												<span class='require'>*</span>
										<?} ?>
										</label><br/>
											<div class="input-group input-group-sm mbs">
											<input id="dictitemName_${dataPropertiesName.id}" type="text" placeholder="请点击选择" class="form-control" disabled="true" />
											 <span class="input-group-btn">
											 	<button id="t_${dataPropertiesName.id}" onclick="multiEditZTree('${dataPropertiesName.dictId}','${dataPropertiesName.id}')" type="button" data-toggle="dropdown"
													class="btn btn-success dropdown-toggle">选择类..</button>
											</span>
											<input name="${dataPropertiesName.nameEn}" id="dictitemId_${dataPropertiesName.id}" type="hidden" class="form-control" 
											
											 <?if(dataPropertiesName.formValidationRegulation !=''){?>
											datatype="${dataPropertiesName.formValidationRegulation}"
										<?} else {?>
											ignore="ignore"
										<?}?>
										/>
									</div>
									</div>
								</div>
								<?}?>

								<!-- 上传图片（单个） -->
								<?if(dataPropertiesName.dataTypeId == 8){?>
								<div class="col-md-6">
									<div class="form-group">
										<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}
										<?if(dataPropertiesName.formValidationRegulation == '*'){?>
												<span class='require'>*</span>
										<?} ?>
										</label><br/>
											<div style= "display:inline " id="single_${dataPropertiesName.id}"></div>
										 	<input type="button" onclick="upImages('${dataPropertiesName.id}',1)"  class="btn btn-primary" style="width:70px; height: 30px; padding: 0; background-color: #4cae4c; border-color: #4cae4c;" value="选择图片" title="只可上传单个图片，如有多个以最后一个为准" />
										 	<input type="button" onclick="deleteImages('${dataPropertiesName.id}')"  class="btn btn-default dropdown-toggle" style="width:70px; height: 30px; padding: 0; " value="删除图片"  />
   											<input type="hidden" id="singlePhone_${dataPropertiesName.id}"  /> 
   											<input type="hidden" name=${dataPropertiesName.nameEn} id="onePhone_${dataPropertiesName.id}" 
   											<?if(dataPropertiesName.formValidationRegulation !=''){?>
											datatype="${dataPropertiesName.formValidationRegulation}"
										<?} else {?>
											ignore="ignore"
										<?}?>
   											/> 
									</div>
								</div>
								<?}?>

								<!-- 上传图片（多个） -->
								<?if(dataPropertiesName.dataTypeId == 26){?>
								<div class="col-md-6">
									<div class="form-group">
										<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}
										<?if(dataPropertiesName.formValidationRegulation == '*'){?>
												<span class='require'>*</span>
										<?} ?>
										</label><br/>
                 						 <div style= "display:inline " id="single_${dataPropertiesName.id}"></div>
										 	<input type="button" onclick="upImages('${dataPropertiesName.id}',2)"  class="btn btn-primary" style="width:70px; height: 30px; padding: 0; background-color: #4cae4c; border-color: #4cae4c;" value="选择图片" title="可上传多个图片" />
										 	<input type="button" onclick="deleteImages('${dataPropertiesName.id}')"  class="btn btn-default dropdown-toggle" style="width:70px; height: 30px; padding: 0; " value="删除全部图片"  />
   											<input type="hidden" id="singlePhone_${dataPropertiesName.id}"  /> 
   											<input type="hidden" name=${dataPropertiesName.nameEn} id="onePhone_${dataPropertiesName.id}" 
   											<?if(dataPropertiesName.formValidationRegulation !=''){?>
											datatype="${dataPropertiesName.formValidationRegulation}"
										<?} else {?>
											ignore="ignore"
										<?}?>
   											/> 
                 						  
									</div>
								</div>
								<?}?>

								<!-- 上传附件（单个） -->
								<?if(dataPropertiesName.dataTypeId == 16 || dataPropertiesName.dataTypeId == 24 || dataPropertiesName.dataTypeId == 25){?>
								<div class="col-md-6">
									<div class="form-group">
										<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}
										<?if(dataPropertiesName.formValidationRegulation == '*'){?>
												<span class='require'>*</span>
										<?} ?>
										</label><br/>
										<div style= "display:inline " id="showone_${dataPropertiesName.id}"></div>
										<input type="button" onclick="upFiles('${dataPropertiesName.id}','1')"  class="btn btn-primary"  style="width:70px; height: 30px; padding: 0; background-color: #4cae4c; border-color: #4cae4c;" value="选择文件"  title="只可上传单个文件，如有多个以最后一个为准"/>
   										<input type="button" onclick="deletefileone('${dataPropertiesName.id}')"  class="btn btn-default dropdown-toggle" style="width:70px; height: 30px; padding: 0; " value="删除文件"  />
   										<input type="hidden" id="singleAdjunctname_${dataPropertiesName.id}" name="${dataPropertiesName.nameEn}" value=""/>
									</div>
								</div>
								<?}?>
								<!-- 文件转换PDF -->
								<?if(dataPropertiesName.dataTypeId == 27 ){?>
								<div class="col-md-6">
									<div class="form-group">
										<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}
										<?if(dataPropertiesName.formValidationRegulation == '*'){?>
												<span class='require'>*</span>
										<?} ?>
										</label><br/>
										<div style= "display:inline " id="showone_${dataPropertiesName.id}"></div>
										<input type="button" onclick="upFiles('${dataPropertiesName.id}','3')"  class="btn btn-primary"  style="width:70px; height: 30px; padding: 0; background-color: #4cae4c; border-color: #4cae4c;" value="选择文件"  title="只可上传单个文件，如有多个以最后一个为准"/>
   										<input type="button" onclick="deletefileone('${dataPropertiesName.id}')"  class="btn btn-default dropdown-toggle" style="width:70px; height: 30px; padding: 0; " value="删除文件"  />
   										<input type="hidden" id="singleAdjunctname_${dataPropertiesName.id}" name="${dataPropertiesName.nameEn}" value=""/>
									</div>
								</div>
								<?}?>
								

								<!-- 上传附件（多个） -->
								<?if(dataPropertiesName.dataTypeId == 17){?>
								<div class="col-md-6">
									<div class="form-group">
										<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}
										<?if(dataPropertiesName.formValidationRegulation == '*'){?>
												<span class='require'>*</span>
										<?} ?>
										</label><br/>
										<div style= "display:inline " id="showmuch_${dataPropertiesName.id}"></div>
										<input type="button" onclick="upFiles('${dataPropertiesName.id}','2')"  style="width:70px; height: 30px; padding: 0; background-color: #4cae4c; border-color: #4cae4c;" class="btn btn-primary" value="选择文件"  />
										<input type="button" onclick="deletefilemuch('${dataPropertiesName.id}')"  class="btn btn-default dropdown-toggle" style="width:70px; height: 30px; padding: 0; " value="删除文件"  />
										<!-- <input type="file" id="muchFile_${dataPropertiesName.id}" name="muchFile_${dataPropertiesName.id}"/>
   										<div id="filemuchQueue_${dataPropertiesName.id}"></div>   -->
   										<input type="hidden" id="singleAdjunctmuch_${dataPropertiesName.id}" name="${dataPropertiesName.nameEn}" value=""/>
									</div>
								</div>
								<?}?>
								<!-- 阿里云上传 -->
								<?if(dataPropertiesName.dataTypeId == 22){?>
								<div class="col-md-6">
									<div class="form-group">
										<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}
										<?if(dataPropertiesName.formValidationRegulation == '*'){?>
												<span class='require'>*</span>
										<?} ?>
										</label><br/>
											<div class="input-group input-group-sm mbs">
											<input id="dictitemName_${dataPropertiesName.id}" type="text" placeholder="请点击选择" class="form-control" disabled="true" />
											 <span class="input-group-btn">
											 	<button id="t_${dataPropertiesName.id}" onclick="aliyunUploading('${dataPropertiesName.id}')" type="button" data-toggle="dropdown" class="btn btn-success dropdown-toggle">选择文..</button>
											</span>
											<input name="${dataPropertiesName.nameEn}" id="dictitemId_${dataPropertiesName.id}" type="hidden" class="form-control" 
											
											 <?if(dataPropertiesName.formValidationRegulation !=''){?>
											datatype="${dataPropertiesName.formValidationRegulation}"
										<?} else {?>
											ignore="ignore"
										<?}?>
										/>
									</div>
									</div>
								</div>
								<?}?>
								<!-- 超级链接  -->
								<?if(dataPropertiesName.dataTypeId == 23){?>
								<div class="col-lg-6">
									<div class="form-group">
										<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}
										<?if(dataPropertiesName.formValidationRegulation == '*'){?>
												<span class='require'>*</span>
											<?} ?>
										</label>
										<input id=${dataPropertiesName.nameEn} type="text" class="form-control" name="${dataPropertiesName.nameEn}" 
											<?if(dataPropertiesName.formValidationRegulation !=''){?>
												datatype="${dataPropertiesName.formValidationRegulation}"
											<?} else {?>
												ignore="ignore"
											<?}?>
										/>
									</div>
								</div>
								<?}?>
								<!-- 数值 -->
								<?if(dataPropertiesName.dataTypeId == 9){?>
								<div class="col-md-6">
									<div class="form-group">
										<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}
										<?if(dataPropertiesName.formValidationRegulation == '*'){?>
												<span class='require'>*</span>
											<?} ?>
										</label>
										<input id=${dataPropertiesName.nameEn} type="text" class="form-control" name=${dataPropertiesName.nameEn}
										 <?if(dataPropertiesName.formValidationRegulation !=''){?>
											datatype="${dataPropertiesName.formValidationRegulation}"
										<?} else {?>
											ignore="ignore"
										<?}?>
										 
										 />
									</div>
								</div>
								<?}?>

								<!-- 日期（年） -->
								<?if(dataPropertiesName.dataTypeId == 10){?>
								<div class="col-md-6">
									<div class="form-group">
										<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}
										<?if(dataPropertiesName.formValidationRegulation == '*'){?>
												<span class='require'>*</span>
											<?} ?>
										</label>
										<input id=${dataPropertiesName.nameEn} type="text" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy'})"
											 class="form-control"  name=${dataPropertiesName.nameEn} 
											 <?if(dataPropertiesName.formValidationRegulation !=''){?>
											datatype="${dataPropertiesName.formValidationRegulation}"
										<?} else {?>
											ignore="ignore"
										<?}?>
											 /> 
									</div>
								</div>
								<?}?>

								<!-- 日期（年-月） -->
								<?if(dataPropertiesName.dataTypeId == 11){?>
								<div class="col-md-6">
									<div class="form-group">
										<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}
										<?if(dataPropertiesName.formValidationRegulation == '*'){?>
												<span class='require'>*</span>
											<?} ?>
										</label>
										<input id=${dataPropertiesName.nameEn} type="text" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM'})"
											class="form-control"  name=${dataPropertiesName.nameEn} 
											<?if(dataPropertiesName.formValidationRegulation !=''){?>
											datatype="${dataPropertiesName.formValidationRegulation}"
										<?} else {?>
											ignore="ignore"
										<?}?>
											/>
									</div>
								</div>
								<?}?>

								<!-- 日期（年-月-日） -->
								<?if(dataPropertiesName.dataTypeId == 12){?>
								<div class="col-md-6">
									<div class="form-group">
										<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}
										<?if(dataPropertiesName.formValidationRegulation == '*'){?>
												<span class='require'>*</span>
											<?} ?>
										</label>
										<input id=${dataPropertiesName.nameEn} type="text" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd'})"
											class="form-control"  name=${dataPropertiesName.nameEn} 
											<?if(dataPropertiesName.formValidationRegulation !=''){?>
											datatype="${dataPropertiesName.formValidationRegulation}"
										<?} else {?>
											ignore="ignore"
										<?}?>
											/>
									</div>
								</div>
								<?}?>

								<!-- 日期（年-月-日 时-分-秒） -->
								<?if(dataPropertiesName.dataTypeId ==13){?>
								<div class="col-md-6">
									<div class="form-group">
										<label for="inputPhone" class="control-label">${dataPropertiesName.nameZh}
										<?if(dataPropertiesName.formValidationRegulation == '*'){?>
												<span class='require'>*</span>
											<?} ?>
										</label>
										<input id=${dataPropertiesName.nameEn} type="text" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})"
											class="form-control"  name=${dataPropertiesName.nameEn} 
											<?if(dataPropertiesName.formValidationRegulation !=''){?>
											datatype="${dataPropertiesName.formValidationRegulation}"
										<?} else {?>
											ignore="ignore"
										<?}?>
											/>
									</div>
								</div>
								<?}?>

								<?}?>
								<?}?>
							</div>
						</div>
						<?for( opy in objectProperty){?>
						<div id="${opy.nameEn}" class="tab-pane fade">
                        	<div class="row mbl">
					           <div class="col-lg-6" style="float: right; padding-bottom: 5px;">
					               <div class="tb-group-actions pull-right">
					               <span>当前共<label id="pageSize">0</label>条记录</span>
					               	&nbsp;&nbsp;&nbsp;&nbsp;<button  class="btn btn-sm btn-primary" type="button" onclick="tadAdd('')"/>新增</button>
					               </div>
					           </div>
					           		<input type="hidden" name="${opy.nameEn}"/>
                         		 <table class="table table-hover table-striped table-bordered table-advanced tablesorter mbn">
           							 <thead>
						                <tr id="pText_${opy.id}"></tr>
						            </thead>
            							<tbody id="text_${opy.id}"></tbody>
       						 	</table>
                       	  	  </div>
                   			</div>
                   		<?}?>
						</div>
						<input type="submit" value="保存" id="submitInput" class="btn btn-primary" />
					</div>
			</form>
		</div>
	</div>
	<!-- <input type="hidden" id="result" value="${resultString}"> -->
	<!--END CONTENT-->
	</div>
	<div id="photos" style="display: none;text-align:center;margin:0 auto;">
	</div>
	<!-- 弹框 -->
	<div id="box1" style="display: none; ">
			<span><h2 style="padding-left: 2%;" id="headline"></h2></span>
            <div class="row mbl"style="width: 966PX;" >
            <div style="padding-left: 1%;">
              <div class="col-lg-6">
	              <div class="input-group input-group-sm mbs">
	              	<span class="input-group-btn">
	               	<select id="filtrate" class="btn btn-danger dropdown-toggle" style="width :100px;">
	               	</select>
	                  </span><input id="electText" type="text" placeholder="请输入关键词..." class="form-control" /><span class="input-group-btn"><button type="button" data-toggle="dropdown" onclick="demo1()" class="btn btn-success dropdown-toggle">搜索</button></span>
	              </div>
          	 </div>
           <div class="col-lg-6">
               <div class="tb-group-actions pull-right" style="padding-top: 2%;"><span>当前共<label id="boxsize"></label>条记录</span></div>
           </div>
           </div>
           		<div style="padding-left: 2%;">
	           		 <table  class="table table-hover table-striped table-bordered table-advanced tablesorter mbn">
					 <thead>
		                <tr id="boxTableOne"></tr>
		            </thead>
	       				<tbody id="boxTableTwo"></tbody>
	  				</table>
	  				</div>
           </div>
        </div>
<?} ?>

<script type="text/javascript">

var dictId ;
var relevances;
var oncid;
var oncliDataId;
var multiDictId;
var aliyunValue;
var multiId;
var _editor;
function getdictIdZTree(){
	return dictId;
}
function getoncliDataId(){
	return oncliDataId;
}
function getmultiDictId(){
	return multiDictId;
}
function getaliyunId(){
	return aliyunValue;
}
function getmultiId(){
	return multiId;
}
	function saveEditZTree(id,oncliId) {
		dictId=id;
		oncliDataId =oncliId;
		layer.open({
			type : 2,
			area : [ '700px', '530px' ],
			fix : false, //不固定
			maxmin : true,
			scrollbar : false,
			shadeClose : true,
			title : '字典项管理',
			btn : [ '保存 ', '关闭' ],
			skin : 'layui-layer-rim', //加上边框
			content : ["knowledge-edit-data-ztree.html",'no'],
			yes : function(index, layer) {
				//alert(index);
				 var iframeWin = parent.window[layer.find('iframe')[0]['name']];
				//alert(iframeWin);
				iframeWin.queren();
			},
			cancel : function(index) {
			}
		});
	};


	//所属  字典类Id
	//树状结构
	
	var did = null; 
	var number = null;
	
	function getlay() {  
            return did;
    }
    
	function getnumber() {  
            return number;
    }
	
	function initTree(id) {
	did = id;
	var nameEn = $("#classesEn").val();
		$.ajax({
			type : "post",
			data : {
			"did" : did,
			"nameEn" : nameEn,
			},
			url : "knowledge-edit-data-detail-ajax.html",
			dataType : "json",
			beforeSend : function(XMLHttpRequest) {},
			success : drawTree,
		});
	}
	var setting = {
			check: {
				enable: true,
				chkboxType: {"Y":"", "N":""}
			},
			view: {
				dblClickExpand: false
			},
			data: {
				simpleData: {
					enable: true
				}
			},
			callback: {
				beforeClick: beforeClick,
				onCheck: onCheck
			}
		};
	function drawTree(data) {
		var zNodes = eval(data);
		$.fn.zTree.init($("#"+did), setting, zNodes).expandAll(true);
		showMenu();
		/* alert(JSON.stringify(zNodes)); */
	}
	
	function beforeClick(treeId, treeNode) {
		var zTree = $.fn.zTree.getZTreeObj(did);
		zTree.checkNode(treeNode, !treeNode.checked, null, true);
		return false;
	}
		
	function onCheck(e, treeId, treeNode) {
			var zTree = $.fn.zTree.getZTreeObj(did),
			nodes = zTree.getCheckedNodes(true),
			v = "";
			for (var i=0, l=nodes.length; i<l; i++) {
				v += nodes[i].name + ",";
			}
			if (v.length > 0 ) v = v.substring(0, v.length-1);
			var cityObj = $("#citySel_"+did);
			cityObj.attr("value", v);
		}

		function showMenu() {
		
			var cityObj = $("#citySel_"+did);
			var cityOffset = $("#citySel_"+did).offset();
			$("#menuContent_"+did).css({left:cityOffset.left + "px", top:cityOffset.top + cityObj.outerHeight() + "px"}).slideDown("fast");

			$("body").bind("mousedown", onBodyDown);
		}
		function hideMenu() {
			$("#menuContent_"+did).fadeOut("fast");
			$("body").unbind("mousedown", onBodyDown);
		}
		function onBodyDown(event) {
			if (!(event.target.id == "menuBtn_"+did || event.target.id == "citySel_"+did || event.target.id == "menuContent_"+did || $(event.target).parents("#menuContent_"+did).length>0)) {
				hideMenu();
			}
		}
	//上传图片
	
	function upload(id,count) {
				number=count;
				did = id;
				layer.open({
				    type : 2,
					area : [ '520px', '420px' ],
					fix : false, //不固定
					scrollbar : false,
					shadeClose : true,
					move : false,
					skin : 'layui-layer-rim', //加上边框
					btn : [ '确定' ],
					content :[ "knowledge-edit-data-detail-uploading.html",'no'],
					yes: function(index,layer){
    	                  var iframeWin = parent.window[layer.find('iframe')[0]['name']];
    	                   iframeWin.save();
    	                   show(did,count);
    	                   
    	              },
					cancel : function(index) {
					}
				});
				
			}
			
		
	function show(id,count){
	var aPath = $("#serversPath").val();
		var str = ""; 
		var pho = ""; 
		$("#photos").html("");
		var onepicture =new Array(); 
			if(count==1){
				var price = $("#singlePhone_"+id).val();
				str +="<a href='javascript:querypicture()' ><img src=\""+aPath+price+"\" width='30' height='30' /></a>";
				pho +="<img src=\""+aPath+price+"\" style='height: auto;max-height: 500px;' />";
				/* var pictureText=price.split('/');
				var onepicture =  pictureText[pictureText.length-1]; */
				$("#single_"+id).html(str);
				$("#photos").html(pho);
				$("#onePhone_"+id).val(price);
		}else{
		var price = $("#parentclassname_"+id).val();
		var arr=new Array();
		arr=price.split(',');//注split可以用字符或字符串分割
		for(var i=0;i<arr.length;i++){
			str +="<img src="+aPath+arr[i]+" width='30' height='30'/>";
				var pictureText=arr[i].split('/');
					 onepicture[i]= pictureText[pictureText.length-1];
		}
		$("#show_"+id).html(str);
		$("#muchPhone_"+id).val(price);
		}
	}	
	$(document).ready(function(){		
		$("file").click(function(){
		  alert();
		});
	});
	//上传附件
	function adjunct(fileId) {
		 $("#fileId").val("123");
				/*number=count;
				 did = id;
				layer.open({
				    type : 2,
					area : [ '520px', '420px' ],
					fix : false, //不固定
					scrollbar : false,
					shadeClose : true,
					move : false,
					skin : 'layui-layer-rim', //加上边框
					btn : [ '保存 ', '关闭' ],
					content :[ "knowledge-edit-data-detail-adjunct.html",'no'],
					yes: function(index,layer){
    	                  var iframeWin = parent.window[layer.find('iframe')[0]['name']];
    	                   iframeWin.save();
    	                   accessory(id,count);
    	              },
					cancel : function(index) {
					}
				}); */
				
			}
	
	function accessory(id,count){
		var str = ""; 
		var onepic = new Array();   
		if(count == 1){
				var price = $("#singleAdjunctname_"+id).val();
				str +="<img src="+price+" width='30' height='30'/>";
				var pictureText=price.split('/');
				var onepicture =  pictureText[pictureText.length-1];
				$("#singleName_"+did).html(str);
				$("#oneFile_"+id).val(onepicture);
		}else{
			var price = $("#adjunctname_"+id).val();
			var arr=new Array();
			arr=price.split(',');//注split可以用字符或字符串分割
			for(var i=0;i<arr.length;i++){
				str +="<img src="+arr[i]+" width='30' height='30'/>";
					var pictureText=arr[i].split('/');
					 onepic[i] =pictureText[pictureText.length-1];
			}
			$("#adjunctname_"+did).html(str);
			$("#muchFile_"+id).val(onepic);
		}
		
	}
	
	 //验证
var wsxForm;
var imagePathId;
var filesPathId;
var filesCount;
var imagesPathType;
$(function(){
	wsxForm = $(".wsxForm").Validform({
		tiptype:1,
		tipSweep:true
	});
	
	_editor = UE.getEditor('uploadImage');
	    _editor.ready(function (){
	        //设置编辑器不可用(事实上不可以设置不可用...所以注释掉,以观后效)
	        _editor.setDisabled();
	        //隐藏编辑器,因为只使用上传功能
	        _editor.hide();
	        //侦听图片上传
	  	 	_editor.addListener('beforeInsertImage',function(t,arg){
	  	 		if(imagesPathType == '1' ){
	  	 			for(var i=0;i<arg.length;i++){
	  	 				var urlPath = arg[i].src;
	  	 				$("#single_"+imagePathId).html('<a href="javascript:querypicture(\''+urlPath+'\')" ><img src='+urlPath+' width="30" height="30"/></a>');
	  	 				 $("#onePhone_"+imagePathId).val(urlPath);
	  	 				 $("#singlePhone_"+imagePathId).val(urlPath);
	  	 			}
	  	 		}else if(imagesPathType == '2'){
	  	 			var singleValue= '';
	  	 			var onePhoneValue= '';
	  	 			var singlePhoneValue= '';
	  	 			for(var i=0;i<arg.length;i++){
	  	 				var urlPath = arg[i].src;
	  	 				singleValue +='<a href="javascript:querypicture(\''+urlPath+'\')" ><img src='+urlPath+' width="30" height="30"/></a>;';
	  	 				onePhoneValue +=urlPath+';';
	  	 				singlePhoneValue +=urlPath+';';
	  	 			}
	  	 			$("#single_"+imagePathId).html(singleValue);
 	 				 $("#onePhone_"+imagePathId).val(onePhoneValue);
 	 				 $("#singlePhone_"+imagePathId).val(singlePhoneValue);
	  	 		}
	        });
	        //侦听文件上传
		   	 _editor.addListener('afterUpfile',function(t,arg){
		   	 	for(var i=0;i<arg.length;i++){
	  	 			var urlFile = arg[i].url;
	  	 			if(filesCount == '1'){
			            $("#singleAdjunctname_"+filesPathId).val(urlFile);
			          	$("#showone_"+filesPathId).html("<a href="+urlFile+" target='_blank' download='w3logo'><img src='static/images/wj.jpg' width='30' height='30' /></a>");
	  	 			}
	  	 			if(filesCount == '2'){
	  	 				 $("#singleAdjunctmuch_"+filesPathId).val(urlFile+"%"+ $("#singleAdjunctmuch_"+filesPathId).val());
						 $("#showmuch_"+filesPathId).append("<a href="+urlFile+" target='_blank' download='w3logo' title='点击下载'><img src='static/images/wj.jpg' width='30' height='30' /></a>");
	  	 			}
	  	 			if(filesCount == '3'){
			            $("#singleAdjunctname_"+filesPathId).val(urlFile);
			          	$("#showone_"+filesPathId).html("<a href="+urlFile+" target='_blank' download='w3logo'><img src='static/images/wj.jpg' width='30' height='30' /></a>");
			          	$.ajax({
							type : "post",
							data : {
								"urlFile" : urlFile,
							},
							url : "fileToPdf.do",
							dataType : "json",
							traditional : true,
							beforeSend : function(XMLHttpRequest) {},
							success : function(data){
								 $("#singleAdjunctname_"+filesPathId).val($("#singleAdjunctname_"+filesPathId).val()+"∷"+data);
						         $("#showone_"+filesPathId).html($("#showone_"+filesPathId).html()+"&nbsp;&nbsp;<a href="+data+" target='_blank' download='w3logo'><img src='static/images/wj.jpg' width='30' height='30' /></a>");
							},
						});
	  	 			}
	  	 		}
		   	 });
	   });
	
});
	//上传图片
	function upImages(imagesId,imagesType) {
		imagePathId = imagesId;
		imagesPathType = imagesType;
		var myFiles = _editor.getDialog("insertimage");
	  		myFiles.open();
	   
	}
	 //上传文件
	function upFiles(filesId,filesMuch) {
		filesPathId = filesId;
		filesCount = filesMuch;
		var myFiles = _editor.getDialog("attachment");
	   	myFiles.open();
	}
function submitForm() {
	// wsxForm.submitForm(false);
	wsxForm.ajaxPost(false);
	return wsxForm.getStatus();
}

//返回列表
function returnList(){
	var classesEn = $("#classesEn").val();
	var classesId = $("#classesId").val();
	var databaseName = $("#databaseName").val();
	var chartName = $("#chartName").val();
	location.href="show-edit-data-list.html?classesEn="+classesEn+"&classesId="+classesId+"&databaseName="+databaseName+"&chartName="+chartName; 
}


//链表字段
function tadAdd(texts){
	$("#headline").html(texts);
	layer.open({
	    type : 1,
		area : [ '966px', '666px' ],
		fix : false, //不固定
		scrollbar : false,
		shadeClose : true,
		move : false,
		title : '增加',
		skin : 'layui-layer-rim', //加上边框
		btn : [ '保存 ', '关闭' ],
		content :$("#box1"),
		yes: function(){
			queryselectText ();
 	      	layer.closeAll();
 	      	layer.msg('添加成功！');
 	    },
		cancel : function(index) {
		}
	});
}
//选中内容
	function queryselectText (){
	  var value=[];
			$("input[name='checkall']:checked").each(function(){
				value.push($(this).val());
			}); 
			$.ajax({
				type : "post",
				data : {
				"id" : relevances,
				"clickId":oncid,
				"classesId":$("#classesId").val(),
				"value" :value
				},
				url : "queryrelevance.do",
				dataType : "json",
				traditional : true,
				beforeSend : function(XMLHttpRequest) {},
				success : function(data){
				//弹框内容
			 	$("#text_"+oncid).html("");
			 	var tableTwo = "";
			 	var myDate = new Date();
  				for(var i=0;i<data.length;i++){
   					for(var k=0;k<data[i].rmap.length;k++){
   					tableTwo +="<tr><td  style='text-align:center'>"+(k+1)+"</td>";
   					 	for(var j=0;j<data[i].rlist.length;j++){
   							tableTwo +="<td  style='text-align:center'>"+data[i].rmap[k][data[i].rlist[j].titleEn]+"</td>";
	 					}
	 						tableTwo +="<td  style='text-align:center'>"+myDate.toLocaleDateString()+"</td>"
				 					 +"<td  style='text-align:center'>"
			 						 +"<button type='button' class='btn btn-default btn-xs' onclick='queryDetails("+data[i].rmap[k].id+")'>删除</button>"
			 						 +"</td></tr>";
	 					document.getElementById('pageSize').innerHTML=data[i].rmap.length;
	 				} 
				}
			    $("#text_"+oncid).append(tableTwo);	
				}
			});
	}

//查询点击
function queryrelevance(relevanceId, clickId){
	relevances = relevanceId;
	oncid = clickId;
	$.ajax({
			type : "post",
			data : {
			"id" : relevanceId,
			"clickId":clickId,
			"classesId":$("#classesId").val(),
			},
			url : "queryrelevance.do",
			dataType : "json",
			beforeSend : function(XMLHttpRequest) {},
			success : function(data){
			//alert(JSON.stringify(data));
			 var str = "";   
//       		 $("#pText").html("");
      		 str +="<th width='50px'  style='text-align:center'>序号</th>";
      		 for(var i=0;i<data.length;i++){
      		 	for(var j=0;j<data[i].rlist.length;j++){
	      		 	str +="<th style='text-align:center'>"+data[i].rlist[j].titleZh+"</th>";
	      		}
      		 }
      		 str += " <th style='text-align:center'>创建时间</th><th width='13%' style='text-align:center'>可操作</th>";
      			//alert("+++"+str);
      		 $("#pText_"+clickId).html(str);
      		 
      		 //筛选
      		  $("#filtrate").html("");
      		  $("#filtrate_"+clickId).html("");
      		  var screen = "";   
      			screen +=" <option>筛选项</option>";
      			for(var i=0;i<data.length;i++){
      		 		for(var j=0;j<data[i].rlist.length;j++){
	      		 		screen +=" <option value="+data[i].rlist[j].titleEn+">"+data[i].rlist[j].titleZh+"</option>";
	      			}
      			 }
      		 $("#filtrate").append(screen);
     
      		 
      		//弹框标题
      		 $("#boxTableOne").html("");
      		  var tableOne = "";   
      		 		tableOne +="<th width='50px' style='text-align:center'><input type='checkbox' class='checkall' /></th> "
						     +"<th width='50px'  style='text-align:center'>序号</th>";
	      		  for(var i=0;i<data.length;i++){
      		 	   	for(var j=0;j<data[i].rlist.length;j++){
	      		 	tableOne +="<th style='text-align:center'>"+data[i].rlist[j].titleZh+"</th>";
	      		   	}
	      		  }
      			 tableOne += "<th width='13%' style='text-align:center'>可操作</th>";
				 $("#boxTableOne").append(tableOne);
			 //弹框内容
			  $("#boxTableTwo").html("");
			 	var tableTwo = "";
  				for(var i=0;i<data.length;i++){
   					for(var k=0;k<data[i].rmap.length;k++){
   					tableTwo +="<tr><td  style='text-align:center'><input name='checkall' type='checkbox' value='"+data[i].rmap[k].id+"'/></td>"
  								  +"<td  style='text-align:center'>"+(k+1)+"</td>";
   					 	for(var j=0;j<data[i].rlist.length;j++){
   							tableTwo +="<td  style='text-align:center'>"+data[i].rmap[k][data[i].rlist[j].titleEn]+"</td>";
	 					}
	 					tableTwo +="<td  style='text-align:center'>"
 						 +"<button type='button' class='btn btn-default btn-xs' onclick='queryDetails("+data[i].rmap[k].id+")'>详情</button>"
 						 +"</td></tr>";
	 					document.getElementById('boxsize').innerHTML=data[i].rmap.length;
	 				} 
				}
			    $("#boxTableTwo").append(tableTwo);	
			},
		});
	}
	//详情
function queryDetails(detailsId){
			alert(detailsId);
		}
		//图片放大
	function querypicture(inagesUrl){
		//var singph = $("#singlePhone_"+inagesUrl).val();
		$('#photos').html("<img src=\""+inagesUrl+"\"style='height: auto;max-height: 500px;' />");
		var index=layer.open({
		  type: 1,
		  title: false,
		  closeBtn: 1,
		  area: ['auto','auto'],
		  skin: 'layui-layer-nobg', //没有背景色
		  shadeClose: true,
		  content: $('#photos')
		});
		layer.iframeAuto(index);
	}
	
	//为客户资料时验证
	function verify(verifyValue,key){
		var headline = $("#headline").val();
		if(headline == '客户资料'){
			if(key == 'xingMing' || key == 'shouJi' || key == 'xing_ming' || key == 'shou_ji'){
				if(key == 'shouJi' || key == 'shou_ji'){
					var reg = new RegExp("^\\d{11}$");
					 if(!reg.test(verifyValue)){
					        layer.msg('请输入正确的11位手机号！');
							$("#"+key).val("");
					 }else{
						 $.ajax({
							type : "post",
							data : {
								"key" : key,
								"value" : verifyValue,
								"classesEn" : $("#classesEn").val(),
							},
							url : "verifyValue.do",
							dataType : "json",
							traditional : true,
							beforeSend : function(XMLHttpRequest) {},
							success : function(data){
								if(data != '0'){
									layer.msg('已存在，请重新输出！');
									$("#"+key).val("");
								}
							},
						});
					 }
				}else{
					$.ajax({
						type : "post",
						data : {
							"key" : key,
							"value" : verifyValue,
							"classesEn" : $("#classesEn").val(),
						},
						url : "verifyValue.do",
						dataType : "json",
						traditional : true,
						beforeSend : function(XMLHttpRequest) {},
						success : function(data){
							if(data != '0'){
								layer.msg('已存在，请重新输出！');
								$("#"+key).val("");
							}
						},
					});
				}
			}
		}
	}
	//多选
	function multiEditZTree(multiDict,multi){
		multiDictId=multiDict;
		multiId=multi;
		layer.open({
			type : 2,
			area : [ '700px', '530px' ],
			fix : false, //不固定
			maxmin : true,
			scrollbar : false,
			shadeClose : true,
			title : '字典项管理',
			btn : [ '保存 ', '关闭' ],
			skin : 'layui-layer-rim', //加上边框
			content : ["knowledge-edit-multi-ztree.html",'no'],
			yes : function(index, layer) {
				 var iframeWin = parent.window[layer.find('iframe')[0]['name']];
				iframeWin.queren();
			},
			cancel : function(index) {
			}
		});
	}
	//阿里云上传
	var aliyunUploadingData='';
	function getAliyunUploadingData(){
		return aliyunUploadingData;
	}
	function aliyunUploading(aliyunId){
		aliyunValue=aliyunId;
		aliyunUploadingData = $("#dictitemId_"+aliyunId).val();
		layer.open({
			type : 2,
			area : [ '800px', '530px' ],
			fix : false, //不固定
			maxmin : true,
			scrollbar : false,
			shadeClose : true,
			title : '阿里云上传',
			btn : [ '保存 ', '关闭' ],
			skin : 'layui-layer-rim', //加上边框
			content : ["knowledge-edit-aliyun-uploading.html",'no'],
			yes : function(index, layer) {
				 var iframeWin = parent.window[layer.find('iframe')[0]['name']];
				iframeWin.queren();
			},
			cancel : function(index) {
			}
		});
	}
	//删除图片
	function deleteImages(delimpId){
		$("#single_"+delimpId).html("");
		$("#singlePhone_"+delimpId).val("");
		$("#onePhone_"+delimpId).val("");
	}
	//删除文件
	function deletefileone(delimpId){
		$("#showone_"+delimpId).html("");
		$("#singleAdjunctname_"+delimpId).val("");
	}
	//删除文件
	function deletefilemuch(delimpId){
		$("#showmuch_"+delimpId).html("");
		$("#singleAdjunctmuch_"+delimpId).val("");
	}
	$(document).on('click',function(e){
		e.stopPropagation();
		$('#submitInput').attr("disabled",false);
	});
</script>
